package com.bwhx.eruler.service.impl;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bwhx.eruler.bean.Baofei;
import com.bwhx.eruler.bean.ChuKuDan;
import com.bwhx.eruler.bean.Page;
import com.bwhx.eruler.bean.Ruler;
import com.bwhx.eruler.dao.RulerDao;
import com.bwhx.eruler.service.RulerService;
import com.bwhx.eruler.service.RulerService;

/**
 * @Description:
 */
@Service
public class RulerServiceImpl implements RulerService {
	@Autowired 
	RulerDao rulerDao;

	//带条件查询
	public List<Ruler> find(Ruler ruler) {
		return rulerDao.find(ruler);
	}

	
	public Ruler get(Serializable id) {
		return rulerDao.get(id);
	}

	
	public void insert(Ruler ruler) {
		rulerDao.insert(ruler);
		
	}

	
	public void update(Ruler ruler) {
		// TODO Auto-generated method stub
		
	}

	
	public void delete(Serializable id) {

		rulerDao.delete(id);
		
	}

	
	public void delete(Serializable[] ids) {
		// TODO Auto-generated method stub
		
	}


	@Override
	public List<Ruler> findByName(String rulername) {
		
		return rulerDao.findByName(rulername);
	}


	@Override
	public String insertSN(String device) {
		// TODO Auto-generated method stub
		return rulerDao.insertSN(device);
	}


	@Override
	public void inputRuler(Ruler r) {
		rulerDao.inputRuler(r);		
	}


	@Override
	public List<Ruler> list(Page p,Long startdateLong, Long enddateLong) {
		return rulerDao.list(p,startdateLong, enddateLong);
	}


	@Override
	public Integer count(Ruler r,Long startdateLong, Long enddateLong) {
		return rulerDao.count(r,startdateLong,enddateLong);

	}


	@Override
	public void insertChuKuDan(ChuKuDan chukudan) {
		rulerDao.insertChuKuDan(chukudan);
		
	}


	@Override
	public void update(ChuKuDan chukudan) {
		rulerDao.update(chukudan);
		
	}


	@Override
	public Ruler findByMAC(String mac) {
		Ruler r = rulerDao.findByMAC(mac);
		return r;
	}


	@Override
	public String findUnusedSN(String device) {
		return rulerDao.findUnusedSN(device);
	}


	@Override
	public Boolean isRsnAvliable(String rsn) {
		// TODO Auto-generated method stub
		return rulerDao.isRsnAvliable(rsn);
	}


	@Override
	public Ruler findBySn(String opcode) {
		return rulerDao.findBySn(opcode);
	}


	@Override
	public Ruler findChuKuBySn(String opc) {
		return rulerDao.findChuKuBySn(opc);
	}


	@Override
	public Ruler find3BySn(String value) {
		return rulerDao.find3BySn(value);
	}


	@Override
	public void insertRulerUser(Map<String, Integer> paramMap) {
		rulerDao.insertRulerUser(paramMap);		
	}


	@Override
	public void updateRFTime(Map map) {
		rulerDao.updateRFTime(map);
	}


	@Override
	public void insertRulerSdk(Map<String, Object> paramMap) {
		rulerDao.insertRulerSdk(paramMap);		
		
	}


	@Override
	public Ruler findByRSN(String rsn) {
		return rulerDao.findByRSN(rsn);
	}


	@Override
	public List<Ruler> list(Page p) {
		
		return rulerDao.list(p);
	}


	@Override
	public Integer count(Ruler r) {
		return rulerDao.count(r);
	}


	@Override
	public Ruler findAvailableRulerBySn(String rsn) {
		return rulerDao.findAvailableRulerBySn(rsn);
	}


	@Override
	public Ruler findChuKuAndBaoFeiBySn(String opc) {
 		return rulerDao.findChuKuAndBaoFeiBySn(opc);
	}


	


	
	


}
